$(document).ready(function() {
	$("#info3").html("<p><center>Gráfico do mês atual</center></p>");
	contmes = getUrlParameters()["contas_do_mes"];
	c_pagas = getUrlParameters()["c_pagas"];
	var data = [
			[ 'Finalizadas',
					parseFloat(getUrlParameters()["contas_do_mes"]) ],
			[ 'À pagar', parseFloat(getUrlParameters()["c_pagas"]) ] ];
	var plot1 = jQuery.jqplot('chart3', [ data ], {
		seriesDefaults : {
			// Make this a pie chart.
			renderer : jQuery.jqplot.PieRenderer,
			rendererOptions : {
				// Put data labels on the pie slices.
				// By default, labels show the percentage of the slice.
				showDataLabels : true
			}
		},
		legend : {
			show : true,
			location : 'e'
		}
	});
});

function getUrlParameters() {
	var map = {};
	var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,
			function(m, key, value) {
				map[key] = value;
			});
	return map;
}